package com.slipper.sfts.stock;

import com.slipper.common.util.ResultUtil;
import com.slipper.sfts.api.stock.bo.StockDealBO;
import com.slipper.sfts.api.stock.service.IStockDealSv;
import com.slipper.system.common.Constants;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/stockDeal")
public class StockDealController {
    @Resource
    private IStockDealSv stockDealSv;

    @PostMapping(value = "/queryPage")
    public String queryPage(@RequestBody StockDealBO bo) {
        bo.setMemberId(Constants.getCurrentUser().getMember().getId());
        return ResultUtil.toJson(stockDealSv.queryPage(bo));
    }
}
